package io;

import sun.awt.image.SurfaceManager;
import sun.awt.image.VolatileSurfaceManager;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class FlushDome {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("bos.txt");
        BufferedOutputStream bos=new BufferedOutputStream(fos);
        String line="她只是我的妹妹，他说姿态很有韵味";
        bos.write(line.getBytes(StandardCharsets.UTF_8));
        System.out.println("写出完毕");
        bos.flush();
        bos.close();

        /*
        FileOutputStream fos=new FileOutputStream("bos.txt");
        BufferedOutputStream bos=new BufferedOutputStream(fos);
        String line="她只是我的妹妹，他说姿态很有韵味";
        bos.write(line.getBytes(StandardCharsets.UTF_8));
        System.out.println("写出完毕");
        bos.flush();
        bos.close();

         */
    }
}
